package ferp.center.server.entity;

import com.google.appengine.api.datastore.Key;

import javax.persistence.*;
import java.util.Date;
import java.util.LinkedList;

/**
 * User: igorgok
 * Date: 1/30/13 9:15 PM
 */
@Entity
public class Device
{
  public void setID(String id) {this.id = id;}
  public void setCreated(Date created) {this.created = created;}
  public void setCountry(String country) {this.country = country;}
  public void setRegion(String region) {this.region = region;}
  public void setCity(String city) {this.city = city;}
  public Key getKey() {return key;}
  public String getCountry() {return country;}
  public String getRegion() {return region;}
  public String getCity() {return city;}

  // get profiles on this device
  public LinkedList<Profile> getProfiles(EntityManager em) {return null;}

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Key key;
  // player device id
  private String id;
  // profile creation date
  @Temporal(TemporalType.DATE)
  private Date created;
  // country
  private String country;
  // area
  private String region;
  // city
  private String city;

  @Version
  private long version;
}
